using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System.Runtime.InteropServices;

namespace Tomahawk.Runtime.Rendering.LightningBolts
{
    #region Vertex declaration
    [StructLayout(LayoutKind.Sequential)]
    struct LightningVertex
    {
        public Vector3 Position;
        public Vector2 TextureCoordinates;
        public Vector2 ColorGradient;
        
        // Describe the layout of this vertex structure.
        public static readonly VertexElement[] VertexElements =
        {
            new VertexElement(0, 0, VertexElementFormat.Vector3,
                                    VertexElementMethod.Default,
                                    VertexElementUsage.Position, 0),
            new VertexElement(0, 12, VertexElementFormat.Vector2,
                                     VertexElementMethod.Default,
                                     VertexElementUsage.TextureCoordinate, 0),
            new VertexElement(0, 20, VertexElementFormat.Vector2,
                                     VertexElementMethod.Default,
                                     VertexElementUsage.TextureCoordinate, 1),
        };

        // Describe the size of this vertex structure.
        public const int SizeInBytes = 28;
    }
    #endregion
}
